Recent years have seen the rapid advancement and proliferation of electronic devices, which devices often require the updating of resident firmware, operating code, and applications or other software loaded thereon, collectively, “binary images”, or simply “images”. Moreover, installing and updating of such binary images is becoming more routine as advancements applicable to a particular device far outpace the rate at which it is desirable to retire the unit and replace it with an entirely new unit. Instead, the operating software and other applications are updated on the device to create a new binary image needing updating or installation on such device.
Moreover, for many devices for which updating the binary image is desirable, these same devices are continually evolving as new features are developed and deployed. In part, this feature growth is adding to the complexity and size of resident operating systems and applications software stored within the device. This increase in complexity and size typically requires larger update packages to be generated, reflecting the increases in functionality, which results in longer over-the-air transmission times to deliver the update package and longer processing times required to apply a given update package within the device.
Additionally, the processing time required to apply an update package to an original image within a client device is directly proportional to the number of flash blocks that must be reprogrammed.
Today's update package generation technology is problematic because, for example, when a new single byte of code or data is inserted at the start of the image will cause the entire image to move and thus every flash block covered by it will need to be reprogrammed. The use of current difference generators in this example, will produce a very small update package, but due to the number of flash block operation required to move the entire image, will take a long apply time on the client device. No difference engine algorithm, however efficient, can improve on this behavior.
Additionally, in an attempt to mitigate the movement of code and thus reduce the number of flash operations associated with an update package, some manufactures have architected improved technology into their difference generators, wherein this technology is dependent on the client firmware being organized into multiple blocks of code, which inserts a fixed percentage of free space into each existing block of code. If the updates to any given block are less than the fixed percentage of free space inserted per block by the difference generator the resultant update package will not need to relocate code associated with this update. However, this technology is inadequate for large updates because if an update exceeds the fixed percentage of free space inserted per block by the difference generator, the difference package reflects a large number of flash operations to relocate all subsequent blocks of code located after the exceeded region.
Accordingly there is a need for an efficient, effective and reliable system and method for reducing the number of flash blocks modified associated with an update package by use of whatever free space is available at the end of the image as required.
A known manner in reducing the size of a new image update is to use a differencing algorithm or binary differencing generator to compare the current or existing binary image with the new binary image to produce a list of differences. Such differences, in a general sense, are typically output or expressed as sequences or sets of ADD, COPY and MOVE operations such that the new image can be created by re-combining binary strings copied from image sequences resident on the device in the original image and interspersing them with binary sequences from the new image for which a suitable copy string was not available in the old image. Additionally, and update encoder communicating with the binary differencing generator combines additional encoding information to the selected instructions from the binary differencing generator and incorporates other operations derived from additional information to ultimately create the update package. One efficient approach to generating update packages is described in U.S. patent application Ser. No. 10/676,483 entitled “Efficient System and Method for Updating a Memory Device”, filed Sep. 30, 2003, the disclosure of which is incorporated herein by reference.
The need therefore is for a method and system that reduces the time required to apply an update package within a client device, and optimizes the number of flash blocks that must be reprogrammed to find the most effective and minimized flash rewrite time for any given original image and new image; resulting in an update package which reflects a minimum of flash block operations in order to effect the new image from the original image by applying the update package.